﻿@model Irandeb4.Models.Company

@{
    ViewBag.Title = "Create";
}

<h2>Registrar Cliente</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <center><h3 style="color:Red">@ViewBag.MessageError</h3></center>
    <fieldset>
    <legend>Datos</legend>
                <fieldset>
                    <legend>Empresa</legend>
                    <table>
                        <tr>
                            <td class="editor-label">
                                *@Html.LabelFor(model => model.Nit, "Nit:")
                            </td>
                            <td class="editor-field">
                                @Html.EditorFor(model => model.Nit)
                                @Html.ValidationMessageFor(model => model.Nit)
                            </td>
                        </tr>

                        <tr>
                            <td class="editor-label">
                                *@Html.LabelFor(model => model.Name, "Nombre:")
                            </td>
                            <td class="editor-field">
                                @Html.EditorFor(model => model.Name)
                                @Html.ValidationMessageFor(model => model.Name)
                            </td>
                        </tr>

                        <tr>
                            <td class="editor-label">
                                *@Html.LabelFor(model => model.Email, "Email:")
                            </td>
                            <td class="editor-field">
                                @Html.EditorFor(model => model.Email)
                                @Html.ValidationMessageFor(model => model.Email)
                            </td>
                        </tr>

                        <tr>
                            <td class="editor-label">
                                @Html.LabelFor(model => model.Phone, "Telefono:")
                            </td>
                            <td class="editor-field">
                                @Html.EditorFor(model => model.Phone)
                                @Html.ValidationMessageFor(model => model.Phone)
                            </td>
                        </tr>

                        <tr>
                            <td class="editor-label">
                                @Html.LabelFor(model => model.Fax, "Fax:")
                            </td>
                            <td class="editor-field">
                                @Html.EditorFor(model => model.Fax)
                                @Html.ValidationMessageFor(model => model.Fax)
                            </td>
                        </tr>

                        <tr>
                            <td class="editor-label">
                                @Html.LabelFor(model => model.Address, "Direccion:")
                            </td>
                            <td class="editor-field">
                                @Html.EditorFor(model => model.Address)
                                @Html.ValidationMessageFor(model => model.Address)
                            </td>
                        </tr>

                        <tr>
                            <td class="editor-label">
                                *@Html.LabelFor(model => model.CityId, "Ciudad:")
                            </td>
                            <td class="editor-field">
                                @Html.DropDownList("CityId", String.Empty)
                                @Html.ValidationMessageFor(model => model.CityId)
                            </td>
                        </tr>

                    </table>
                </fieldset>
                          
                <br/>
                @Html.EditorFor(model => model.Employee)
                @Html.ValidationMessageFor(model => model.Employee)

            <div align="right">
                <br/>
                @Html.ActionLink("Volver", "Search")
                <input type="submit" value="Registrar" />
            </div>

    </fieldset>
}


